This invention relates to content addressable memories, and more particularly to content addressable memories that have associated circuitry for enabling the memory to be used to perform sum-of-products logic.
Commonly assigned Heile U.S. Pat. No. 6,020,759 (which is hereby incorporated by reference herein in its entirety), shows programmable logic array integrated circuit devices that include large blocks of memory that can be used to perform product term (xe2x80x9cp-termxe2x80x9d) or sum-of-products logic if desired. Alternatively, these large blocks of memory can be used as random access memory (xe2x80x9cRAMxe2x80x9d) or read-only memory (xe2x80x9cROMxe2x80x9d). Commonly assigned Veenstra et al. U.S. Pat. No. 6,160,419 and Heile U.S. Pat. No. 6,144,573 (both of which are hereby incorporated by reference herein in their entireties), show another possible use of such blocks of memory as content addressable memory. However, both of the just-mentioned references contemplate that significant circuitry will be devoted to providing the output signals that are generally required from a content addressable memory. Such output signals typically include (1) a Match signal for indicating whether or not any data word stored in the content addressable memory has been found to match an applied data word, and (2) address signals (e.g., in binary code) indicating the address of the word in the memory found to match the applied data word. In the Veenstra reference, for example, a second memory block may be programmed to encode addresses and provide a match signal for a first memory block acting as a content addressable memory. In the last-mentioned Heile reference separate match and address encoding circuitry is shown for providing such content addressable memory output signals.
Because it may be desired to provide content addressable memory capability on general-purpose devices (e.g., programmable logic array integrated circuit devices) which may only occasionally need to have such capability, it would be desirable not to have to dedicate too many circuit resources to providing a content addressable memory option.
In view of the foregoing, it is an object of this invention to provide improved content addressable memory capability, especially for multi-purpose circuitry such as programmable logic devices.
It is a more particular object of this invention to make it possible for a block of memory that can operate in p-term mode and that has sum-of-products output capability to be used as a content addressable memory with little or no additional circuitry being required.
These and other objects of the invention are accomplished in accordance with the principles of the invention by storing the data words to be matched in addresses in a memory block so that when a match with an applied data word is found, the p-term outputs of the memory block can be logically combined by the associated sum-of-products circuitry to provide an encoded xe2x80x9cvirtualxe2x80x9d address of the matching, stored data word. For example, each word to be matched has an associated unique virtual address in the content addressable memory. In order for the sum-of-products circuitry to encode that virtual address, each word to be matched is stored at one or more actual addresses in the memory block. The actual addresses chosen for a data word are such that when that data word matches an applied data word, the resulting one or more p-term output signals from the memory occur within groups that correspond to the code for the virtual address associated with the matching data word. For example, the virtual address code may be binary code. In that case all data words with odd virtual addresses will be stored in actual addresses that produce p-terms that feed sum-of-products circuitry for producing the least significant bit of the encoded virtual address. Continuing with this example, all data words with virtual addresses that need to be encoded using a 1 in the next-to-least-significant place of the binary-encoded virtual address will be stored in actual addresses that produce p-terms feeding sum-of-products circuitry for producing the next-to-least-significant bit of the encoded virtual address. A very small amount of additional circuitry (e.g., one programmable logic module in a programmable logic device that includes the memory block) can be used to form the logical OR of the encoded virtual address signals to provide a Match output signal for the content addressable memory feature.
Further features of the invention, its nature and various advantages will be more apparent from the accompanying drawings and the following detailed description of the preferred embodiments.